package ex103;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        PositiveInteger positiveInteger = new PositiveInteger();

        System.out.print("输入一个正整数: ");
        positiveInteger.value = scanner.nextInt();
        System.out.printf("各位数字之和是: %d\n", positiveInteger.sumOfDigits());
    }
}
